package com.lilinling.yinzhi.user.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserRegisterVo implements Serializable {
    private  static final long serialVersionUID = 1L;
    /**
     * 账号
     */
    @NotEmpty(message = "账号必须提交")
    @Length(min = 6,max = 18,message = "用户名必须是6-18位字符")
    private String account;
    /**
     * 密码
     */

    @Length(min = 6,max = 18,message = "用户名必须是6-18位字符")
    private String password;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 手机号码
     */
    @Pattern(regexp = "^[1][3-9][0-9]{9}$",message = "手机号格式不正确")
    @NotEmpty(message = "手机号必须填写")
    private String mobile;
}
